﻿#pragma execution_character_set("utf-8")
// 本文件为utf-8 编码格式

#include "ImageStickerViewController.h"
#include "../GdDefine.h"
#include "../Views/ImageStickerItemView.h"
#include "../Util/GDUtil.h"

ImageStickerViewController::ImageStickerViewController(void)
{
}


ImageStickerViewController::~ImageStickerViewController(void)
{
}

bool ImageStickerViewController::init(){
	if (!CAViewController::init()){
		return false;
	}
	return true;
}

void ImageStickerViewController::viewDidLoad(){
	CCSize winSize = this->getView()->getBounds().size;

	CAView* editIconNode = CAView::createWithFrame(CCRect(0,0,winSize.width,winSize.height), CAColor_gray);
	this->getView()->addSubview(editIconNode);

	GdBean imageStickerBean = GdBean();
	imageStickerBean.id = 1;
	imageStickerBean.value = "goodsgrab/ImageStickerTemp.png";
	imageStickerBean.ext = "goodsgrab/ImageStickerTemp.png";

	ImageStickerItemView *imageStickerItemView = ImageStickerItemView::createWithFrame(editIconNode->getBounds(), imageStickerBean);
	//imageStickerItemView->setImageStickerTemplateDelegate(this);
	editIconNode->addSubview(imageStickerItemView);
	GDUtil::setSubViewToCenter(editIconNode, imageStickerItemView);
} 
void ImageStickerViewController::viewDidUnload(){

}
void ImageStickerViewController::viewDidAppear(){

}
void ImageStickerViewController::viewDidDisappear(){

}